extends layout

block content
	form(method='post', action='/map')
		h2 Battleships on the Map
		hr
		#player.border
			div.playerLabel Player
			for item, i in data.player.field
				for val, j in item
					if val == 0
						span.cell.empty
							| &nbsp;
					if val == 1
						span.cell.live
							| &nbsp;
					if val > 1
						span.cell.hit
							| &nbsp;
				br

		br
		#enemy.border
			div.playerLabel Enemy
			for item, i in data.enemy.field
				for val, j in item
					if val == -1
						span.cell.unknown
							| &nbsp;
					if val == 0
						span.cell.empty
							| &nbsp;
					if val == 1
						span.cell.live
							| &nbsp;
					if val > 1
						span.cell.hit
							| &nbsp;
				br

		div(style="clear:both; padding: 10px")
		input#start(type="submit", value="Shoot!")

	script(type='text/javascript', src='/socket.io/socket.io.js')
	script(type='text/javascript', src='/js/client.js')